package com.ys;

import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service("myDao")
public class MyDao {
	
	
	@Autowired
	private SqlSessionTemplate sqlTemplate;

	public void setSqlTemplate(SqlSessionTemplate sqlTemplate) {
		this.sqlTemplate = sqlTemplate;
	}
	
	
	public void insert(){
		
		System.out.println(sqlTemplate);
		
		sqlTemplate.insert("test.addCon");
	}
	
	
	
	
	
}
